Skip to content

feat(react-toolbar): expose base hooks and types for Toolbar components#35903

Open
dmytrokirpa wants to merge 2 commits intomicrosoft:masterfrom
dmytrokirpa:feat/react-toolbar-expose-base-hooks
Open

feat(react-toolbar): expose base hooks and types for Toolbar components#35903
dmytrokirpa wants to merge 2 commits intomicrosoft:masterfrom
dmytrokirpa:feat/react-toolbar-expose-base-hooks

Conversation

@dmytrokirpa
Copy link
Copy Markdown
Contributor

Summary

  • Exports useToolbarBase_unstable, ToolbarBaseProps, ToolbarBaseState
  • Exports useToolbarButtonBase_unstable, ToolbarButtonBaseProps, ToolbarButtonBaseState
  • Exports useToolbarDividerBase_unstable, ToolbarDividerBaseProps, ToolbarDividerBaseState
  • Exports useToolbarRadioButtonBase_unstable, ToolbarRadioButtonBaseProps, ToolbarRadioButtonBaseState
  • Exports useToolbarToggleButtonBase_unstable, ToolbarToggleButtonBaseProps, ToolbarToggleButtonBaseState
  • Updates renderToolbar_unstable to accept ToolbarBaseState instead of ToolbarState — the render only uses state.root.children which is present in the base state

All hooks and types were already implemented in the component source files (added in PR #35658) but gated behind comments in index.ts.

Tracking: #35562

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.3 MB
324.826 kB
1.3 MB
324.899 kB
187 B
73 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
70.397 kB
19.96 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
236.774 kB
68.762 kB
react-components
react-components: FluentProvider & webLightTheme
43.612 kB
14.022 kB
react-portal-compat
PortalCompatProvider
8.386 kB
2.624 kB
react-timepicker-compat
TimePicker
108.565 kB
35.848 kB
🤖 This report was generated against 5a2ed7e2f471cf05a06d13f88893db50cb49f51b

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link
Copy Markdown

@github-actions github-actions bot Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Menu Converged - submenuIndicator slotted content 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 12 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 172 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 27 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 25 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 68 Changed
vr-tests-react-components/TagPicker 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - Dark Mode.chromium.png 658 Changed
vr-tests-react-components/TagPicker.disabled - RTL.disabled input hover.chromium.png 635 Changed

There were 2 duplicate changes discarded. Check the build logs for more information.

@dmytrokirpa dmytrokirpa force-pushed the feat/react-toolbar-expose-base-hooks branch from aff6b2a to 51bf3d3 Compare April 15, 2026 12:24
Copy link
Copy Markdown
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default vs user props overrides

It's a bit tricky to review these changes as a small change in order could break things. As we have already faced regressions before (#35710), please cover matching changes with UTs (use linked PR for reference)

Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants